package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysOrderEvaluateMapper;
import com.ruoyi.system.domain.SysOrderEvaluate;
import com.ruoyi.system.service.ISysOrderEvaluateService;

/**
 * 订单评价Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-12
 */
@Service
public class SysOrderEvaluateServiceImpl implements ISysOrderEvaluateService 
{
    @Autowired
    private SysOrderEvaluateMapper sysOrderEvaluateMapper;

    /**
     * 查询订单评价
     * 
     * @param id 订单评价主键
     * @return 订单评价
     */
    @Override
    public SysOrderEvaluate selectSysOrderEvaluateById(String id)
    {
        return sysOrderEvaluateMapper.selectSysOrderEvaluateById(id);
    }

    /**
     * 查询订单评价列表
     * 
     * @param sysOrderEvaluate 订单评价
     * @return 订单评价
     */
    @Override
    public List<SysOrderEvaluate> selectSysOrderEvaluateList(SysOrderEvaluate sysOrderEvaluate)
    {
        return sysOrderEvaluateMapper.selectSysOrderEvaluateList(sysOrderEvaluate);
    }

    /**
     * 新增订单评价
     * 
     * @param sysOrderEvaluate 订单评价
     * @return 结果
     */
    @Override
    public int insertSysOrderEvaluate(SysOrderEvaluate sysOrderEvaluate)
    {
        sysOrderEvaluate.setCreateTime(DateUtils.getNowDate());
        return sysOrderEvaluateMapper.insertSysOrderEvaluate(sysOrderEvaluate);
    }

    /**
     * 修改订单评价
     * 
     * @param sysOrderEvaluate 订单评价
     * @return 结果
     */
    @Override
    public int updateSysOrderEvaluate(SysOrderEvaluate sysOrderEvaluate)
    {
        sysOrderEvaluate.setUpdateTime(DateUtils.getNowDate());
        return sysOrderEvaluateMapper.updateSysOrderEvaluate(sysOrderEvaluate);
    }

    /**
     * 批量删除订单评价
     * 
     * @param ids 需要删除的订单评价主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderEvaluateByIds(String[] ids)
    {
        return sysOrderEvaluateMapper.deleteSysOrderEvaluateByIds(ids);
    }

    /**
     * 删除订单评价信息
     * 
     * @param id 订单评价主键
     * @return 结果
     */
    @Override
    public int deleteSysOrderEvaluateById(String id)
    {
        return sysOrderEvaluateMapper.deleteSysOrderEvaluateById(id);
    }
}
